import request from '@/utils/request'

export function getCoupon(id) {
  return request({
    url: `/coupon/coupon/getById/${id}`,
    method: 'get'
  })
}

export function saveCoupon(data) {
  return request({
    url: '/coupon/coupon/save',
    method: 'post',
    data
  })
}

export function updateCoupon(data) {
  return request({
    url: '/coupon/coupon/update',
    method: 'post',
    data
  })
}

export function couponList(params) {
  return request({
    url: '/coupon/coupon/find',
    method: 'post',
    params
  })
}

export function deleteCoupon(ids) {
  return request({
    url: '/coupon/coupon/delete',
    method: 'post',
    data: ids
  })
}
